﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CreateCusdoc.aspx.cs" Inherits="CreateCusdoc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <script type='text/javascript' src="Assets/js/jquery-custom-1.0.0.js?v=2011"></script>
    <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css" />
    <script type='text/javascript' src="assets/js/jquery.ui.datepicker.js"></script>
    <script type='text/javascript' src="Assets/Js/encoder.js"></script>
    <script type='text/javascript' src="assets/js/Carrs.js"></script>
    <script type='text/javascript' src="assets/js/Ports.js"></script>
    <script type='text/javascript' src="assets/js/Carrs.js"></script>
    <style type="text/css">
        .thheader
        {
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        table.adminlist td
        {
            padding: 7px !important;
        }
        table.adminlist thead th
        {
            padding: 7px !important;
        }
        table.adminlist thead th
        {
            padding: 7px !important;
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        .tdboder
        {
            border: none !important;
        }
        .tdboder p
        {
            padding: 1px !important;
            width: 40px;
            border: 1px solid #ccc !important;
            border-bottom: 1px solid #ccc !important;
        }
        input[type=text], input[type=password], textarea, select
        {
            border: none;
            line-height: 22px;
            width: 100% !important;
        }
        input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        #txtNote
        {
            border: 1px solid;
            width: 300px !important; ;}
        input[type=text]:hover, input[type=password]:hover, textarea:hover, select:hover
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        .bottom td
        {
            font-weight: bold;
            text-align: left;
        }
        .rdCustType
        {
            margin-top: 5px;
            border-bottom: 0px;
            float: left;
            font-weight: bold;
            color: #FDD901;
        }
        .rdCustType tbody
        {
            margin-top: 5px;
            border-bottom: 0px;
        }
        .rdCustType td
        {
            background-color: #ABBBCB;
        }
        .rdCustType label
        {
            line-height: 20px;
            margin-top: -16px;
            padding: 0px 0px 0px 20px;
        }
        .rdCustType input
        {
            padding-left: 40px;
            cursor: pointer;
        }
        .rdCustType tbody
        {
            border: none;
        }
    </style>
    <script type="text/javascript">
        var vFethchVal = 0;
        $(document).ready(function () {
            $('#txtTypeOfMovement').autocomplete(['LCL/LCL - CFS/CFS', 'FCL/FCL - CY/CY'], { matchContains: true });
            var arrContType = ["20'DC",
                            "40'DC",
                            "40'HC",
                            "20'RF",
                            "40'RF",
                            "20'OT",
                            "40'OT",
                            "20'FR",
                            "40'FR",
                            "20'HC",
                            "20'RH",
                            "40'RF",
                            "OTHER"];
            $('.txtContType').autocomplete(arrContType, { matchContains: true });
            $('#txtCARRCODE').focus().autocomplete(carrs, { matchContains: true });
            $('.txtLocation').focus().autocomplete(ports);
            $('.txtDischarge').focus().autocomplete(ports);
            $('#txtPORID').focus().autocomplete(ports);
            $('#txtPORID').focus().autocomplete(ports);
            $('#txtPOLID').focus().autocomplete(ports);
            $('#txtPODID').focus().autocomplete(ports);
            $('#txtDESTID').focus().autocomplete(ports);
            $('#txtPAYABLEAT').focus().autocomplete(ports);
            $('#txtPOISS').focus().autocomplete(ports);
            $("#txtSHONBOARD").datepicker({ dateFormat: "M-dd-yy" });
            $("#txtDOISS").datepicker({ dateFormat: "M-dd-yy" });
            $("#txtCTRVALID").datepicker({ dateFormat: "M-dd-yy" });
            $("#txtBACKDATE").datepicker({ dateFormat: "M-dd-yy" });
            $(".calendar-icon.trackingdate").datepicker({ dateFormat: "dd/mm/yy" });
            $(".calendar-icon.trackingdateETA").datepicker({ dateFormat: "dd/mm/yy" });
            $('#txtFILENO').blur(function () {
                var vHBNNO = "00" + $(this).val();
                $("#txtHBLNO").val(vHBNNO);
            });
            $('#txtPORID').blur(function () {
                $("#txtPOLID").val($(this).val());
            });
            $('#txtPODID').blur(function () {
                $("#txtDESTID").val($(this).val());
            });

            $("#ddTOP").change(function () {
                //txtPAYABLEAT
                if (this.value == 'FREIGHT COLLECT');
                {
                    var destCoutry = $("#txtDESTID").val().split(",")[1];
                    if (destCoutry)
                        $('#txtPAYABLEAT').val(destCoutry);
                }

            });

            $(".txtLocation").blur(function () {
                if (this.value.toLowerCase() == $("#txtPOLID").val().toLowerCase()) {
                    var obj = $(this).parent().parent();
                    var txtTrackingDate = $(obj).children().find('.calendar-icon.trackingdate');
                    var txtVssl = $(obj).children().find('.txtVssl');
                    var txtVoyno = $(obj).children().find('.txtVoyno');
                    $(txtTrackingDate).val($("#txtSHONBOARD").val());
                    $(txtVssl).val($("#txtVSSL").val());
                    $(txtVoyno).val($("#txtVOYNO").val());
                }
            });

            $(".ddStatus").change(function () {
                var obj = $(this).parent().parent();
                var txtLocation = $(obj).children().find('.txtLocation');
                var txtTrackingDate = $(obj).children().find('.calendar-icon.trackingdate');
                var txtVssl = $(obj).children().find('.txtVssl');
                var txtVoyno = $(obj).children().find('.txtVoyno');

                if ($(this).val() == "ATD 1") {
                    $(txtLocation).val($("#txtPOLID").val());
                    $(txtTrackingDate).val($("#txtSHONBOARD").val());
                    $(txtVssl).val($("#txtVSSL").val());
                    $(txtVoyno).val($("#txtVOYNO").val());
                }
                else {
                    objPrev = $(obj).prev();
                    currVal = $(this).val();
                    prevVal = $(objPrev).children().find('.ddStatus').val();
                    if (prevVal) {
                        prevValLast = String(prevVal).substring(prevVal.length, prevVal.length - 1);
                        currValLast = String(currVal).substring(currVal.length, currVal.length - 1);
                        if (prevValLast == currValLast) {
                            var txtVsslPrev = $(objPrev).children().find('.txtVssl');
                            var txtVoynoPrev = $(objPrev).children().find('.txtVoyno');
                            $(txtVssl).val($(txtVsslPrev).val());
                            $(txtVoyno).val($(txtVoynoPrev).val());
                        }
                        else {
                            $(txtLocation).val("TBA");
                            $(txtTrackingDate).val("TBA");
                            $(txtVssl).val("TBA");
                            $(txtVoyno).val("TBA");
                        }
                    }
                    else {
                        $(txtLocation).val("TBA");
                        $(txtTrackingDate).val("TBA");
                        $(txtVssl).val("TBA");
                        $(txtVoyno).val("TBA");
                    }
                }
            });
            $("#cbMBLTYPE_0").click(function () {
                var current = $(this);
                if (current.is(":checked")) {
                    $('#cbMBLTYPE_1').attr("checked", false);
                    if ($('#cbHBLTYPE_0').not(":checked") && $('#cbHBLTYPE_1').not(":checked")) {
                        FetchValue();
                        vFethchVal = 1; // Only MBL Type Selected
                    }
                    else {
                        vFethchVal = 2; // MBL Type Selected AND HBL Type Selected
                    }
                }
            });
            $("#cbMBLTYPE_1").click(function () {
                var current = $(this);
                if (current.is(":checked")) {
                    $('#cbMBLTYPE_0').attr("checked", false);
                    if ($('#cbHBLTYPE_0').not(":checked") && $('#cbHBLTYPE_1').not(":checked")) {
                        FetchValue();
                        vFethchVal = 1;
                    }
                    else {
                        vFethchVal = 2;
                    }
                }
            });
            $("#cbHBLTYPE_0").click(function () {
                var current = $(this);
                if (current.is(":checked")) {
                    $('#cbHBLTYPE_1').attr("checked", false);
                    vFethchVal = 2;
                }
                else if ($('#cbMBLTYPE_0').is(":checked") || $('#cbMBLTYPE_1').is(":checked")) {
                    vFethchVal = 1;
                }
                else
                    vFethchVal = 0;
            });
            $("#cbHBLTYPE_1").click(function () {
                var current = $(this);
                if (current.is(":checked")) {
                    $('#cbHBLTYPE_0').attr("checked", false);
                    vFethchVal = 2;
                }
                else if ($('#cbMBLTYPE_0').is(":checked") || $('#cbMBLTYPE_1').is(":checked")) {
                    vFethchVal = 1;
                }
                else
                    vFethchVal = 0;

            });

        });

        jQuery("document").ready(function () {
            var vid = getUrlVars()['id'];
            var arrSuggestions = ["HBLSHPR", "HBLCNEE", "HBLNTF", "MBLSHPR", "MBLCNEE", "MBLNTF", "AGDLVR", "CARRN"];
            $("textarea").bind('keyup', function () {
                var colName = $(this).attr("id");
                colName = colName.substring(3, colName.length);
                if (vid == undefined && jQuery.inArray(colName, arrSuggestions) >= 0) {
                    var Key = this.value;
                    jQuery.ajax({
                        type: "POST",
                        url: "AjaxFile/GetCusDocInfo.ashx?action=GetSuggettion&ColumnName=" + colName + "&Key=" + Key,
                        success: function (msg) {
                            var arrSource = eval('(' + msg + ')');
                            var objName = "#txt" + colName;
                            $(objName).autocomplete(arrSource, { matchContains: true, width: 200, max: 200, cacheLength: 200 });
                        }
                    });
                }
            });

            //Fetch Value when Input            
            //            $("#txtMBLNO").blur(function () {
            //                $("#txtHBLNO").val($("#txtMBLNO").val());
            //            });
            $("#txtHBLSHPR").blur(function () {
                if (vFethchVal == 1)
                    $("#txtMBLSHPR").val($("#txtHBLSHPR").val());
            });
            $("#txtHBLCNEE").blur(function () {
                if (vFethchVal == 1)
                    $("#txtMBLCNEE").val($("#txtHBLCNEE").val());
            });
            $("#txtHBLNTF").blur(function () {
                if (vFethchVal == 1)
                    $("#txtMBLNTF").val($("#txtHBLNTF").val());
            });
            $("#txtMBLCNEE").blur(function () {
                if (vFethchVal == 2)
                    $("#txtAGDLVR").val($("#txtMBLCNEE").val());
            });
            $('#txtSHONBOARD').change(function () {
                var vDois = $(this).val();
                $("#txtDOISS").val(vDois);
            });
        });
        function FetchValue() {
            $("#txtHBLNO").val($("#txtMBLNO").val());
            $("#txtMBLSHPR").val($("#txtHBLSHPR").val());
            $("#txtMBLCNEE").val($("#txtHBLCNEE").val());
            $("#txtMBLNTF").val($("#txtHBLNTF").val());
        }

        function doDeleteSPR(docID, shpID) {
            if (confirm('Bạn có thực sự muốn xóa ?')) {
                var strHref = "CreateCusdoc.aspx?action=deleteSPR&ID=" + docID + "&shpID=" + shpID;
                window.location.href = strHref;
            }
        }
        function doDeleteTracking(docID, trkID) {
            if (confirm('Bạn có thực sự muốn xóa ?')) {
                var strHref = "CreateCusdoc.aspx?action=deleteTrk&ID=" + docID + "&trkID=" + trkID;
                window.location.href = strHref;
            }
        }
    </script>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                DOC DETAIL:
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                <div class="content-box-header">
                    <input id="Button1" type="button" style="float: right; margin: 9px 10px;" class="button"
                        value="&nbsp;&nbsp;Back&nbsp;&nbsp;" onclick="window.location.href='Cusdoc.aspx'" />
                    <asp:Button class="button" ID="btnSave" Style="float: right; margin: 9px 10px;" runat="server"
                        Text="Save" OnClick="btnSave_Click" />
                    <div class="clear">
                    </div>
                </div>
                <div>
                    <table style="width: 300px;">
                        <tr>
                            <td>
                                <div class="rdCustType">
                                    <asp:CheckBoxList ID="cbMBLTYPE" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="1" Text="Ori.MBL"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Sur.MBL"></asp:ListItem>
                                    </asp:CheckBoxList>
                                </div>
                            </td>
                            <td>
                                <div class="rdCustType">
                                    <asp:CheckBoxList ID="cbHBLTYPE" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="1" Text="Ori.HBL"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Sur.HBL"></asp:ListItem>
                                    </asp:CheckBoxList>
                                </div>
                            </td>
                            <td style="padding-left: 40px; text-align: right;">
                                Note:
                            </td>
                            <td>
                                <asp:TextBox ID="txtNote" runat="server" Text=""></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader" width="100px;">
                                FILE NO.
                                <%--Số file--%>
                            </td>
                            <td class="thheader" width="120px;">
                                M.BKG NO.
                                <%--Số booking hãng tàu--%>
                            </td>
                            <td class="thheader" width="100px;">
                                CARRIER
                                <%--ma hang tau--%>
                            </td>
                            <td class="thheader" width="125px;">
                                MBL NO.
                                <%--Số vận đơn của hãng tàu--%>
                            </td>
                            <td class="thheader" width="125px;">
                                HBL NO.
                                <%--Số vận đơn của BV--%>
                            </td>
                            <td class="thheader">
                                HBL SHPR
                                <%--Người gửi hàng--%>
                            </td>
                            <td class="thheader">
                                HBL CNEE
                                <%--Người nhận hàng--%>
                            </td>
                            <td class="thheader">
                                HBL NOTIFY
                                <%--Người thông báo--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:TextBox ID="txtFILENO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMBKGNO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCARRCODE" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMBLNO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtHBLNO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtHBLSHPR" runat="server" Width="85%" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtHBLCNEE" runat="server" Width="85%" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtHBLNTF" runat="server" Width="85%" Text="THE SAME AS CONSIGNEE"
                                    TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                        </tr>
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                SERI BILL
                                <%--Số bill phat hanh--%>
                            </td>
                            <td class="thheader">
                                VSSL<%--Tên con tàu--%>
                            </td>
                            <td class="thheader">
                                VOY No<%--Số chuyến tàu--%>
                            </td>
                            <td class="thheader">
                                PLACE OF RECEIPT<%--P.O.R:Địa điểm nhận hàng--%>
                            </td>
                            <td class="thheader">
                                POL<%--Cảng chất hàng--%>
                            </td>
                            <td class="thheader">
                                SHIPPED ON BOAR<%--Ngày lên tàu--%>
                            </td>
                            <td class="thheader">
                                PORT OF DISCHARGES<%--POD:Cảng giao hàng--%>
                            </td>
                            <td class="thheader">
                                DEST.<%--Cảng đến--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:TextBox ID="txtSERIBILL" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtVSSL" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtVOYNO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPORID" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPOLID" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSHONBOARD" runat="server" Width="85%" CssClass="calendar-icon"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPODID" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtDESTID" runat="server" Width="85%"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <%--<div class="content-box-header">
                            <h3 style="cursor: s-resize;">
                                Details Infomation
                            </h3>
                        </div>
                        <div class="clear">
                        </div>--%>
                    <asp:Repeater ID="rptShippingDetail" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td align="center">
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    <asp:HiddenField ID="txtID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'>
                                    </asp:HiddenField>
                                </td>
                                <td align="center">
                                    <asp:TextBox ID="txtCONT" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "CONT")%>'
                                        CssClass="clsPol"></asp:TextBox>
                                </td>
                                <td align="center">
                                    <asp:TextBox ID="txtSEAL" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "SEAL")%>'
                                        CssClass="clsPod"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContType" CssClass="txtContType" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ContType")%>'></asp:TextBox>
                                    <%--<asp:DropDownList ID="ddContType" runat="server">
                                            <asp:ListItem Text="20'DC"></asp:ListItem>
                                            <asp:ListItem Text="40'DC"></asp:ListItem>
                                            <asp:ListItem Text="40'HC"></asp:ListItem>
                                            <asp:ListItem Text="20'RF"></asp:ListItem>
                                            <asp:ListItem Text="40'RF"></asp:ListItem>
                                            <asp:ListItem Text="20'OT"></asp:ListItem>
                                            <asp:ListItem Text="40'OT"></asp:ListItem>
                                            <asp:ListItem Text="20'FR"></asp:ListItem>
                                            <asp:ListItem Text="40'FR"></asp:ListItem>
                                            <asp:ListItem Text="20'HC"></asp:ListItem>
                                            <asp:ListItem Text="20'RH"></asp:ListItem>
                                            <asp:ListItem Text="40'RF"></asp:ListItem>
                                            <asp:ListItem Text="OTHER"></asp:ListItem>
                                        </asp:DropDownList>--%>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtVOL" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "VOL")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPKGS" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PKGS")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtGW" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-buyprice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "GW")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtMEAS" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-buypriceinvoice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "MEAS")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTEMP" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-sellprice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "TEMP")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                <thead>
                                    <tr>
                                        <th align="center" class="thheader">
                                            Index
                                        </th>
                                        <th align="center" class="thheader">
                                            CONT.<%--Số container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            SEAL<%--Số chì--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            TYPE<%--Loại container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VOL<%--Loại container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            PKGS<%--Quy cách đong hàng--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            G.W (KGS)<%--Tổng trọng lượng--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            MEAS. (CBM)<%--Số khối--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            TEMP.( Degree)<%--Nhiệt độ--%>
                                        </th>
                                        <td>
                                            Action
                                        </td>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr class="bottom">
                                <td colspan="4">
                                    Tổng cộng
                                </td>
                                <td>
                                    <%=spdVOL_Sum > 0 ? spdVOL_Sum.ToString() : ""%>
                                </td>
                                <td>
                                </td>
                                <td>
                                    <%=spdGW_Sum > 0 ? spdGW_Sum.ToString("#,#.00") : ""%>
                                </td>
                                <td>
                                    <%=spdMEAS_Sum > 0 ? spdMEAS_Sum.ToString("#,#.00") : ""%>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </FooterTemplate>
                    </asp:Repeater>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                DESCRIPTION OF GOODS, MARKS & NUMBERS<%--Diễn giải hàng hóa:--%>
                            </td>
                            <td class="thheader">
                                TYPE OF MOVEMENT<%--Điều kiện vận chuyển:--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:TextBox ID="txtDOGMN" runat="server" TextMode="MultiLine" Rows="6" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtTypeOfMovement" runat="server" Width="85%"></asp:TextBox>
                                <%-- <asp:DropDownList ID="ddTypeOfMovement" runat="server" Width="85%">
                                    <asp:ListItem Value="LCL/LCL - CFS/CFS" Text="LCL/LCL - CFS/CFS"></asp:ListItem>
                                    <asp:ListItem Value="FCL/FCL - CY/CY" Text="FCL/FCL - CY/CY"></asp:ListItem>
                                    <asp:ListItem Value="OTHER" Text="OTHER"></asp:ListItem>
                                </asp:DropDownList>--%>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader" width="155px;">
                                TERMS OF PAYMENT<%--T.O.P:Loại cước thanh toán:--%>
                            </td>
                            <td class="thheader" width="100px;">
                                PAYABLE AT<%--Nơi thanh toán:--%>
                            </td>
                            <td class="thheader" width="130px;">
                                PLACE OF ISSUE<%--P.O.ISS.:Nơi phát hành BILL:--%>
                            </td>
                            <td class="thheader" width="110px;">
                                NUMBER OF ORIGINAL<%-- N.O.ORI.:Số lượng vận đơn gốc:--%>
                            </td>
                            <td class="thheader" width="120px;">
                                DATE OF ISSUE<%--D.O.ISS.:Ngày phát hành BILL:--%>
                            </td>
                            <td class="thheader">
                                DELIVERY AGENT<%--AG. DLVR.:Tên đại lý:--%>
                            </td>
                            <td class="thheader">
                                CARR NAME<%--CARR. N.Tên hãng tàu:--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:DropDownList ID="ddTOP" runat="server" Width="85%">
                                    <asp:ListItem Text="FREIGHT PREPAID" Value="FREIGHT PREPAID"></asp:ListItem>
                                    <asp:ListItem Text="FREIGHT COLLECT" Value="FREIGHT COLLECT"></asp:ListItem>
                                    <asp:ListItem Text="AS AGREED" Value=" AS AGREED"></asp:ListItem>
                                    <asp:ListItem Text="AS ARRANGED" Value="AS ARRANGED"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPAYABLEAT" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPOISS" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddNOORI" runat="server" Width="85%">
                                    <asp:ListItem Value="THREE ( 3)" Text="THREE ( 3)"></asp:ListItem>
                                    <asp:ListItem Value="FOUR (4)" Text="FOUR (4)"></asp:ListItem>
                                    <asp:ListItem Value="FIVE (5)" Text="FIVE (5)"></asp:ListItem>
                                    <asp:ListItem Value="SIX (6)" Text="SIX (6)"></asp:ListItem>
                                    <asp:ListItem Value="ZERO (0)" Text="ZERO (0)"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                <asp:TextBox ID="txtDOISS" runat="server" Width="85%" CssClass="calendar-icon"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAGDLVR" runat="server" Width="85%" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCARRN" runat="server" Width="85%" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                MBL SHPR<%--Người gửi hàng trên MBL:--%>
                            </td>
                            <td class="thheader">
                                MBL CNEE<%--Người nhận hàng trên MBL:--%>
                            </td>
                            <td class="thheader">
                                MBL NTF<%--Người thông báo trên MBL:--%>
                            </td>
                            <td class="thheader" width="130px">
                                BOOKER<%--Người đặt chỗ:--%>
                            </td>
                            <td class="thheader" width="75px">
                                CONTRACT CODE<%--CTR. NO:Số hợp đồng:--%>
                            </td>
                            <td class="thheader" width="120px">
                                CONTRACTUAL VALIDITY<%--CTR. VALID:Ngày hết hạn hợp đồng:--%>
                            </td>
                            <td class="thheader" width="120px">
                                CONTRACTUAL NAME<%--CTR.NAME:Tên hợp đồng:--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:TextBox ID="txtMBLSHPR" runat="server" Width="85%" Text="" TextMode="MultiLine"
                                    Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMBLCNEE" runat="server" Width="85%" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMBLNTF" runat="server" Width="85%" Text="THE SAME AS CONSIGNEE"
                                    TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtBOOKER" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCTRNO" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCTRVALID" runat="server" Width="85%" CssClass="calendar-icon"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCTRNAME" runat="server" Width="85%"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <asp:Repeater ID="rptTracking" runat="server" OnItemDataBound="rptTracking_ItemDataBound">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <%--<td align="center">
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    <asp:HiddenField ID="txtID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'>
                                    </asp:HiddenField>
                                </td>
                                <td align="center">
                                    <asp:HiddenField ID="txtStatus" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Status")%>' />
                                    <asp:DropDownList ID="ddStatus" runat="server" CssClass="ddStatus">
                                        <asp:ListItem Text="" Value=""></asp:ListItem>
                                        <asp:ListItem Text="DEPOT" Value="DEPOT"></asp:ListItem>
                                        <asp:ListItem Text="TMNAL." Value="TMNAL."></asp:ListItem>
                                        <asp:ListItem Text="CUT.OFF" Value="CUT.OFF"></asp:ListItem>
                                        <asp:ListItem Text="ATD 1" Value="ATD 1"></asp:ListItem>
                                        <asp:ListItem Text="ATD 2" Value="ATD 2"></asp:ListItem>
                                        <asp:ListItem Text="ATD 3" Value="ATD 3"></asp:ListItem>
                                        <asp:ListItem Text="ATA 1" Value="ATA 1"></asp:ListItem>
                                        <asp:ListItem Text="ATA 2" Value="ATA 2"></asp:ListItem>
                                        <asp:ListItem Text="ATA 3" Value="ATA 3"></asp:ListItem>
                                        <asp:ListItem Text="ETA 1" Value="ETA 1"></asp:ListItem>
                                        <asp:ListItem Text="ETA 2" Value="ETA 2"></asp:ListItem>
                                        <asp:ListItem Text="ETA 3" Value="ETA 3"></asp:ListItem>
                                        <asp:ListItem Text="ETA 4" Value="ETA 4"></asp:ListItem>
                                        <asp:ListItem Text="ETD 2" Value="ETD 2"></asp:ListItem>
                                        <asp:ListItem Text="ETD 3" Value="ETD 3"></asp:ListItem>
                                        <asp:ListItem Text="ETD 4" Value="ETD 4"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>--%>
                                <td align="center">
                                    <asp:HiddenField ID="txtID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'>
                                    </asp:HiddenField>
                                    <asp:TextBox ID="txtLocation" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "Location")%>'
                                        CssClass="txtLocation"></asp:TextBox>
                                </td>
                                <td align="center">
                                    <asp:Label ID="lblETDAccept" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ETDAcceptStatus")%>'> </asp:Label>
                                </td>
                                <td align="center">
                                    <asp:CheckBox ID="cbETDAccept" runat="server" Checked='<%#Eval("ETDAccept").ToString()=="1"?true:false%>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTrackingDate" runat="server" CssClass="calendar-icon trackingdate"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "TrackingDate")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtVssl" runat="server" CssClass="txtVssl" Text='<%# DataBinder.Eval(Container.DataItem, "Vssl")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtVoyno" runat="server" CssClass="txtVoyno" Text='<%# DataBinder.Eval(Container.DataItem, "Voyno")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDischarge" runat="server" CssClass="txtDischarge" Text='<%# DataBinder.Eval(Container.DataItem, "Discharge")%>'></asp:TextBox>
                                </td>
                                <td align="center">
                                    <asp:Label ID="lblETAAccept" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ETAAcceptStatus")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:CheckBox ID="cbETAAccept" runat="server" Checked='<%#Eval("ETAAccept").ToString()=="1"?true:false%>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtETA" runat="server" CssClass="calendar-icon trackingdateETA"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "ETA")%>'></asp:TextBox>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                <thead>
                                    <tr>
                                        <%-- <th align="center" class="thheader">
                                            Index
                                        </th>
                                        <th align="center" class="thheader">
                                            STATUS<%--Trạng thái--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            LOADING<%--LOCATION Ngay di--%>
                                        </th>
                                        <th align="center" class="thheader" colspan="3">
                                            DEPARTURE
                                            <%--Ngay di--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VSSL<%--Tên chuyến tàu--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VOY NO<%--Số chuyến--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            DISCHARGE<%--Cang di--%>
                                        </th>
                                        <th align="center" class="thheader" colspan="3">
                                            ARRIVAL
                                            <%--Ngay den--%>
                                        </th>
                                        <th>
                                            Action
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                RATE<%--Giá cước:--%>
                            </td>
                            <td class="thheader">
                                UNIT<%--Đơn vị:--%>
                            </td>
                            <td class="thheader">
                                CURR.<%--Loại tiền:--%>
                            </td>
                            <td class="thheader">
                                TOTAL VALUE<%--D.VALUE:Tổng giá trị:--%>
                            </td>
                            <td class="thheader">
                                STUFFING AT<%-- STUFF:Đong hàng:--%>
                            </td>
                            <td class="thheader">
                                T.O.P MBL<%--D.VALUE:Tổng giá trị:--%>
                            </td>
                            <td class="thheader">
                                BACKDATE<%-- STUFF:Đong hàng:--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td>
                                <asp:TextBox ID="txtRATE" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtUNIT" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCURR" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtDVALUE" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSTUFF" runat="server" Width="85%"></asp:TextBox>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddTOPMBL" runat="server" Width="85%">
                                    <asp:ListItem Text="Prepaid" Value="Prepaid"></asp:ListItem>
                                    <asp:ListItem Text="Collect" Value="Collect"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                <asp:TextBox ID="txtBACKDATE" runat="server" Width="85%"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
